<div class="card">
    <div class="card-body">
        <div class="row">
            @foreach($materials as $material)
                <div class="col-12 col-sm-3 mt-3">
                    <div class="card shadow-sm">
                        <div class="image">
                            <img src="{{$material['content']['picurl']}}" class="card-img-top">
                        </div>
                        <div class="card-body text-center">
                            <div class="btn-group btn-group-sm" role="group" aria-label="Basic example">
                                <a class="btn btn-outline-primary"
                                   href="{{route('wechat.material.edit',$material)}}">编辑</a>

                                <btn-del class-name="btn btn-outline-secondary"
                                         action="{{route('wechat.material.destroy',$material)}}">删除
                                </btn-del>
                                <a class="btn btn-outline-info"
                                   href="{{route('wechat.material.show',$material)}}">预览</a>
                            </div>
                        </div>
                    </div>
                </div>
            @endforeach
        </div>
    </div>
    <div class="card-footer text-muted bg-white d-flex">

        <a href="{{route('wechat.material.create',['type'=>$type])}}" class="btn btn-primary">添加图片素材</a>
        <div class="flex-fill d-flex justify-content-end">
            {{$materials->links()}}
        </div>
    </div>
</div>
